﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;

namespace Orderr
{
    [Serializable]
    public class Client
    {
        [Key, DatabaseGenerated(DatabaseGeneratedOption.None)]
        public int ClientID { get; set; }
        public string Name { get; set; }
//        public virtual List<Order> Orders { get; set; }
        public Client(int ID, string x) { ClientID = ID;  Name = x; }
        public Client() {}
        public override string ToString()
        {
            return Name;
        }
        public override bool Equals(object obj)
        {
            if (obj == null) return false;
            Client m = obj as Client;
            return ClientID == m.ClientID;
        }
        public override int GetHashCode()
        {
            return Name.GetHashCode();
        }
    }
}
